﻿using Abp.NHibernate.EntityMappings;
using Abp.Application.Editions;
using Akso.Authorization.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Akso.NHibernate.EntityMappings
{
    /// <summary>
    /// Define mapping between <see cref="Edition"/> entity and "AbpEditions" table using FluentNHibernate.
    /// 
    /// Inherits from <see cref="EntityMap{TEntity,TPrimaryKey}"/>.
    /// EntityMap gets table name in it's constructor and automatically maps Id property. So, we do not map Id again.
    /// </summary>
    public class EditionMap : EntityMap<Edition, int>
    {
        public EditionMap() : base("AbpEditions")
        {
            Id(x => x.Id);
            Map(x => x.CreationTime);
            Map(x => x.CreatorUserId);
            Map(x => x.DeleterUserId);
            Map(x => x.DeletionTime);
            Map(x => x.DisplayName);
            Map(x => x.IsDeleted);
            Map(x => x.LastModificationTime);
            Map(x => x.LastModifierUserId);
            Map(x => x.Name);
            //References(x => x.AssignedPerson).Column("AssignedPersonId").LazyLoad();
        }
    }
}
